//
//  XianShangViewController.m
//  KCFurProject
//
//  Created by ios程序员 on 15/11/9.
//  Copyright (c) 2015年 ios程序员. All rights reserved.
//

#import "XianShangViewController.h"
#import "XiangShangTableCell.h"

@interface XianShangViewController ()<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic ,strong) UITableView *xSTableView;

@end

@implementation XianShangViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self tableViewSubViews];
}

- (void)tableViewSubViews
{
    self.xSTableView = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStyleGrouped];
    self.xSTableView.delegate = self;
    self.xSTableView.dataSource = self;
    [self.view addSubview:self.xSTableView];
    self.xSTableView.rowHeight = 100;
    [self.xSTableView registerClass:[XiangShangTableCell class] forCellReuseIdentifier:@"xSReuse"];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    XiangShangTableCell *cell = [tableView dequeueReusableCellWithIdentifier:@"xSReuse"];
    cell.xSImage.backgroundColor = [UIColor redColor];
    cell.yiBaoMingLabel.backgroundColor = [UIColor blueColor];
    cell.pinPaiLabel.backgroundColor = [UIColor orangeColor];
    cell.huoDongTime.backgroundColor = [UIColor yellowColor];
    cell.addLabel.backgroundColor = [UIColor greenColor];
    cell.baoMing.backgroundColor = [UIColor blackColor];
    
    return cell;
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
